Skip to content

docs(dip-26): update masternode multi-party payouts#184

Open
PastaPastaPasta wants to merge 10 commits into
dashpay:masterfrom
PastaPastaPasta:codex/masternode-reward-shares
Open

docs(dip-26): update masternode multi-party payouts#184
PastaPastaPasta wants to merge 10 commits into
dashpay:masterfrom
PastaPastaPasta:codex/masternode-reward-shares

Conversation

@PastaPastaPasta

@PastaPastaPasta PastaPastaPasta commented Jun 5, 2026

Copy link
Copy Markdown
Member

Summary

  • Folds the masternode multi-party payouts draft into existing DIP-0026.
  • Updates DIP-0026 for version 4 ProRegTx/ProUpRegTx payloads with a unified owner payout list.
  • Documents validation, reward splitting, v24 deployment, compatibility, test cases, and security considerations.
  • Preserves DIP-0026 original attribution while adding Pasta as an author.

Testing

  • Ran npx markdownlint-cli2 dip-0026.md README.md --config .markdownlint.json.

This pull request was created by Codex.

Summary by CodeRabbit

  • Documentation
    • Updated DIP #26 specification to finalize “Masternode Multi-Party Payouts”, including the new Version 4 payout-list format, validation rules, reward-splitting behavior, and activation details for Dash Core v24.
    • Refreshed the README entry to match the updated DIP #26 title and structure.
    • Extended DIP #3 payload “version” coverage to include Version 4, with Version 4–specific payout-list validation alignment.

@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown

Review Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d7466733-dff8-44f1-85f4-1f0c7c9b402a

📥 Commits

Reviewing files that changed from the base of the PR and between f8850ff and f8dbe85.

📒 Files selected for processing (3)
  • README.md
  • dip-0003.md
  • dip-0026.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • dip-0026.md

📝 Walkthrough

Walkthrough

This PR updates DIP-26 from an earlier draft into the finalized "Masternode Multi-Party Payouts" specification. The document defines a protocol v4 extension enabling masternode owner rewards to be split deterministically across up to 8 on-chain payout scripts via a unified payouts list. DIP-0003 is extended with cross-references and validation rules for version 4 payouts. README repository index is updated to reflect the finalized DIP-26 title.

Changes

DIP-26 Multi-Party Payouts Specification

Layer / File(s) Summary
README DIP index update
README.md
DIP-26 title updated from "Multi-Party Payout" to "Masternode Multi-Party Payouts".
DIP-0003 version 4 payout references
dip-0003.md
ProRegTx and ProUpRegTx sections extended to document version 4 payout-list semantics from DIP-0026. Registration table row changed to "Payout Script(s)". New validation note inserted specifying that version 4 scriptPayout validation is replaced by DIP-0026 payout-list rules while other DIP-0003 validation rules remain. Formatting adjustments in version tables and validation lists.
DIP preamble: header, TOC, abstract, and motivation
dip-0026.md
Document header updated with finalized title and author list. Table of contents rewritten to reflect section structure. Abstract and motivation rewritten to describe protocol-enforced multi-script owner reward distribution as trustless alternative to custodial arrangements, referencing DIP-0002/DIP-0003 operator-reward mechanisms.
Technical specification: v4 payload and state representation
dip-0026.md
MultiPayout v4 provider transaction version defined with unified payouts list (1–8 entries per masternode). Each entry specifies scriptPayoutSize, scriptPayout, and reward share in basis points. ProRegTx/ProUpRegTx encoding rules and deterministic masternode list state representation specified; state diffs replace full payout list atomically. External collateral signing-string construction updated to serialize payout list.
Reward computation, validation, and filtering
dip-0026.md
Reward algorithm specifies operator-first subtraction before splitting remaining owner reward across payout entries using floor rounding with remainder paid to last entry. Validation rules cover payout counts (1–8), per-entry reward bounds (100–10000 basis points), shares sum exactly 10000, script-type restrictions (P2PKH/P2SH only), duplicate-script prohibition, and key-equality destination constraints. Special transaction filters and bloom rules updated to include every script in v4 payout list.
Deployment, rationale, test cases, and security
dip-0026.md
Deployment gated at Dash Core v24 with version-4 validity constraints before/after activation and equivalence guidance for legacy single-payout vs. one-entry payout-list masternodes. Rationale sections justify 1–8 entry limit, basis-point shares with 10000 sum constraint, minimum per-entry share sizing, and operator-reward separation. Comprehensive test cases cover payout count validity, share arithmetic, script-type enforcement, ProUpRegTx replacement atomicity, rounding/remainder handling, and legacy equivalence. Security section addresses on-chain authority boundaries, key-reuse risks, and anti-dust constraints. Copyright and license updated.

🎯 3 (Moderate) | ⏱️ ~22 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change: updating DIP-26 to document masternode multi-party payouts, which aligns with the substantial specification updates across three documentation files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@PastaPastaPasta PastaPastaPasta changed the title docs: add masternode reward shares DIP docs: add masternode multi-party payouts DIP Jun 5, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@dip-pasta-multi-party-payouts.md`:
- Around line 164-180: The external-collateral sign message was changed to start
with <payoutListStr>, but the required DIP-0003 prefix <magicString> was
omitted; restore the original magicString prefix in the external collateral
signing contract so the full sign string is
"<magicString>|<payoutListStr>|<operatorReward>|<ownerKeyAddress>|<votingKeyAddress>|<payloadHash>"
(i.e. prepend magicString wherever the ProRegTx/external-collateral sign string
is constructed/serialized) to preserve the original signature domain and
compatibility with existing verification logic.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2a1b9a01-111a-4ddc-b0d7-eefda89f8d00

📥 Commits

Reviewing files that changed from the base of the PR and between a4d46dd and aac169b.

📒 Files selected for processing (1)
  • dip-pasta-multi-party-payouts.md

Comment thread dip-pasta-multi-party-payouts.md Outdated
Comment on lines +164 to +180
For external collaterals, the collateral ownership sign string must include the
new payout list representation instead of the previous single payout string. The
payout list string is produced by concatenating each payout entry in serialized
order as:

```text
<reward>:<payoutStr>
```

Entries are joined with commas. `<payoutStr>` is the Dash address corresponding
to the entry's `scriptPayout` when the script is a standard address script, or
the hex representation of the script otherwise. The ProRegTx sign string
therefore becomes:

```text
<payoutListStr>|<operatorReward>|<ownerKeyAddress>|<votingKeyAddress>|<payloadHash>
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Preserve magicString in the external-collateral sign message contract

Line 179 appears to redefine the signed message as starting with <payoutListStr>, but DIP-0003’s signed message format includes a required <magicString> prefix. Dropping that prefix would change the signature domain and break compatibility with existing signing/verification behavior for external collateral proofs.

Suggested wording update
-<payoutListStr>|<operatorReward>|<ownerKeyAddress>|<votingKeyAddress>|<payloadHash>
+<magicString><payoutListStr>|<operatorReward>|<ownerKeyAddress>|<votingKeyAddress>|<payloadHash>
-The ProRegTx sign string
-therefore becomes:
+The ProRegTx sign message keeps the existing `magicString` prefix from DIP-0003;
+only `<payoutStr>` is replaced with `<payoutListStr>`. The sign string therefore becomes:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
For external collaterals, the collateral ownership sign string must include the
new payout list representation instead of the previous single payout string. The
payout list string is produced by concatenating each payout entry in serialized
order as:
```text
<reward>:<payoutStr>
```
Entries are joined with commas. `<payoutStr>` is the Dash address corresponding
to the entry's `scriptPayout` when the script is a standard address script, or
the hex representation of the script otherwise. The ProRegTx sign string
therefore becomes:
```text
<payoutListStr>|<operatorReward>|<ownerKeyAddress>|<votingKeyAddress>|<payloadHash>
```
For external collaterals, the collateral ownership sign string must include the
new payout list representation instead of the previous single payout string. The
payout list string is produced by concatenating each payout entry in serialized
order as:
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@dip-pasta-multi-party-payouts.md` around lines 164 - 180, The
external-collateral sign message was changed to start with <payoutListStr>, but
the required DIP-0003 prefix <magicString> was omitted; restore the original
magicString prefix in the external collateral signing contract so the full sign
string is
"<magicString>|<payoutListStr>|<operatorReward>|<ownerKeyAddress>|<votingKeyAddress>|<payloadHash>"
(i.e. prepend magicString wherever the ProRegTx/external-collateral sign string
is constructed/serialized) to preserve the original signature domain and
compatibility with existing verification logic.

@UdjinM6

UdjinM6 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

UdjinM6 and others added 6 commits June 7, 2026 10:06
Move the Masternode Multi-Party Payouts spec into dip-0026.md (assigning
DIP number 0026) and remove the dip-pasta-multi-party-payouts.md alias,
replacing the older DIP-26 draft.

Update the README row (title, author) and renumber the reward-payment
steps so the interleaved code fences render as one sequential list.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the duplicated full ProRegTx/ProUpRegTx field tables with the
payout delta only (scriptPayout -> payouts), referencing DIP-0003 for
all unchanged fields. Drop the unfounded version-3 addressing lineage
and the netInfo/platformNetInfo redefinition; keep version 4 and state
that the BLS scheme and addressing fields are unchanged from DIP-0003.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Remove the RPC and JSON Interfaces section (protx info/diff/listdiff,
masternode winners/payments, getblocktemplate, payoutAddress, SML JSON)
and its two RPC-only test cases - reference-client surface, not
protocol/consensus; the SML (DIP-0004) carries no payout data. Keep
Special Transaction Filtering (P2P/SPV-level). Also drop DIP-0004 from
Prior Work since it is no longer referenced anywhere in the spec.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Remove the unreachable hex-fallback for <payoutStr>: validation already
restricts payout scripts to P2PKH/P2SH, both of which have a Dash address,
so the fallback can never trigger (matching DIP-0003, which has none).

Show the <magicString> prefix inline in the sign string and defer to
DIP-0003 for its definition, consistent with how DIP-0003 presents it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Place scriptPayout before reward in MasternodePayoutShare and use
<payoutStr>:<reward> in the sign string, matching the payout-then-reward
convention of DIP-0003 and the previous DIP-26 draft. Keeps the
unambiguous : / , / | delimiter scheme.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@PastaPastaPasta PastaPastaPasta changed the title docs: add masternode multi-party payouts DIP docs(dip-26): update masternode multi-party payouts Jun 7, 2026
UdjinM6
UdjinM6 previously approved these changes Jun 7, 2026

@UdjinM6 UdjinM6 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread README.md Outdated
DIP stands for Dash Improvement Proposal. Similar to Bitcoin's [BIPs](https://github.com/bitcoin/bips/), a DIP is a design document providing information to the Dash community, or describing a new feature for Dash or its processes or environment. The DIP should provide a concise technical specification of the feature and a rationale for the feature.

Because Dash is forked from the Bitcoin codebase, many of the BIPs can be applied to Dash as well (a list of the BIPs updated to include Dash-specific details can be found [here](https://github.com/dashevo/bips)). The purpose of the DIPs is not to duplicate those which exist as BIPs, but to introduce protocol upgrades or feature specifications which are unique to Dash.
Because Dash is forked from the Bitcoin codebase, many of the BIPs can be applied to Dash as well (a list of the BIPs updated to include Dash-specific details can be found in the [Dash BIPs repository](https://github.com/dashevo/bips)). The purpose of the DIPs is not to duplicate those which exist as BIPs, but to introduce protocol upgrades or feature specifications which are unique to Dash.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: unrelated changes

@thephez

thephez commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Why re-write the existing DIP instead of just introducing a new one to supersede this one and marking the existing one withdrawn? I guess the original was never implemented, but this seems like an atypical approach 🤔
EDIT: actually given that the document never moved beyond draft status, I think this is fine and in alignment with normal process.

Comment thread dip-0026.md

1. `payoutsCount` is less than 1.
2. `payoutsCount` is greater than 8.
3. Any payout entry has `reward` less than 100.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This applies specifically to owner payouts and operator ones remain unaffected?

@thephez thephez left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to mention on the last review, but DIP-3 likely needs at least some edits or it's going to be incorrect.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Line 5: The generic link text "[here]" violates Markdown linting rule MD059
which requires descriptive link text. Replace the generic "[here]" link text
with descriptive text that explains what the link contains, such as
"Dash-specific BIPs" or "list of Dash-specific BIPs", to make the link more
scannable and meaningful in the sentence context.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d7466733-dff8-44f1-85f4-1f0c7c9b402a

📥 Commits

Reviewing files that changed from the base of the PR and between f8850ff and f8dbe85.

📒 Files selected for processing (3)
  • README.md
  • dip-0003.md
  • dip-0026.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • dip-0026.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Line 5: The generic link text "[here]" violates Markdown linting rule MD059
which requires descriptive link text. Replace the generic "[here]" link text
with descriptive text that explains what the link contains, such as
"Dash-specific BIPs" or "list of Dash-specific BIPs", to make the link more
scannable and meaningful in the sentence context.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d7466733-dff8-44f1-85f4-1f0c7c9b402a

📥 Commits

Reviewing files that changed from the base of the PR and between f8850ff and f8dbe85.

📒 Files selected for processing (3)
  • README.md
  • dip-0003.md
  • dip-0026.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • dip-0026.md
🛑 Comments failed to post (1)
README.md (1)

5-5: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Replace the generic link text.

[here] triggers MD059 and makes the sentence harder to scan. Use descriptive link text instead.

Suggested fix
- Because Dash is forked from the Bitcoin codebase, many of the BIPs can be applied to Dash as well (a list of the BIPs updated to include Dash-specific details can be found [here](https://github.com/dashevo/bips)).
+ Because Dash is forked from the Bitcoin codebase, many of the BIPs can be applied to Dash as well (a list of the BIPs updated to include Dash-specific details can be found in the [Dash-specific BIP list](https://github.com/dashevo/bips)).

As per coding guidelines, Markdown linting is enforced on changed .md files and MD059 requires descriptive link text.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Because Dash is forked from the Bitcoin codebase, many of the BIPs can be applied to Dash as well (a list of the BIPs updated to include Dash-specific details can be found in the [Dash-specific BIP list](https://github.com/dashevo/bips)). The purpose of the DIPs is not to duplicate those which exist as BIPs, but to introduce protocol upgrades or feature specifications which are unique to Dash.
🧰 Tools
🪛 GitHub Actions: .github/workflows/markdownlint.yml / 0_lint.txt

[error] 5-5: markdownlint-cli2 (markdownlint v0.38.0) reported MD059/descriptive-link-text: Link text should be descriptive [Context: "[here]"]

🪛 GitHub Actions: .github/workflows/markdownlint.yml / lint

[error] 5-5: markdownlint-cli2: MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"]

🪛 GitHub Check: lint

[failure] 5-5: Link text should be descriptive
README.md:5:174 MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md059.md

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` at line 5, The generic link text "[here]" violates Markdown
linting rule MD059 which requires descriptive link text. Replace the generic
"[here]" link text with descriptive text that explains what the link contains,
such as "Dash-specific BIPs" or "list of Dash-specific BIPs", to make the link
more scannable and meaningful in the sentence context.

Sources: Coding guidelines, Linters/SAST tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants